<!--推力角接触球轴承滚动体受载与寿命计算-->
<template>
  <div class="sum" style="width: 100%; height: 100%;font-size: 16px;display: flex;overflow-y:auto;">
    <a-row style="height: 100%;width: 100%;overflow-y: auto">
      <a-col :span="10" style="height: 100%;border-radius: 3px" class="data_container">
        <a-row style="height: 3%;width: 100%;background: #D7D7D7;border-radius: 3px">输入参数</a-row>
        <a-row style="height: 97%;width: 100%;">
          <a-row style="height: 60%;width: 100%;" class="data_container">
            <a-row style="height: 5%;background: #D7D7D7;width: 100%;border-radius: 3px">基本参数</a-row>
            <a-row style="height: 95%;width: 100%;border-radius: 3px">
              <a-row style="height: 8%;width: 100%;">
                <a-col :span="6" style="height: 100%;">
                  <a-col :span="9" style="height: 100%;text-align: right;line-height: 29px;">
                    载荷类型
                  </a-col>
                  <a-col :span="15" style="height: 100%;line-height: 29px;">
                    <select style="height: 80%;margin-left: 5px" @click="xz1" v-model="input_data.load_type">
                      <option value="1">极限载荷</option>
                      <option value="2">疲劳载荷</option>
                    </select>
                  </a-col>
                </a-col>
                <a-col :span="18" style="height: 100%;" @click="import_load">
                  <a-upload :show-upload-list="false" :maxCount="1"  :customRequest="customRequest" name="file">
                    <button v-show="input_data.load_type=='1'" >导入承轴极限载荷</button>
                  </a-upload>
                  <a-upload :show-upload-list="false" :maxCount="1"  :customRequest="customRequest" name="file">
                    <button v-show="input_data.load_type=='2'" >导入承轴极限载荷</button>
<!--                    <span>注：载荷文件为.xls或.xlsx格式，其各列参数如下表所示(无需表头)</span>-->
                  </a-upload>
                  <span style="font-size: 6px">注：载荷文件为.xls或.xlsx格式，其各列参数如下表所示(无需表头)</span>
                </a-col>
              </a-row>
              <a-row style="height: 40%;width: 100%;background: darkolivegreen;text-align: center">
                <el-table
                    v-if="input_data.load_type=='1'"
                    class="data_container1"
                    :data="tableData1"
                    height="100%"
                    stripe
                    style="width: 100%;font-size: 12px">
                  <el-table-column
                      prop="date1"
                      label="序号"
                      width="100"
                      >
                  </el-table-column>
                  <el-table-column
                      prop="date2"
                      label="Fx(N)"
                      width="100"
                      >
                  </el-table-column>
                  <el-table-column
                      prop="date3"
                      label="Fy(N)"
                      width="100"
                      >
                  </el-table-column>
                  <el-table-column
                      prop="date4"
                      label="Fz(N)"
                      width="100"
                      >
                  </el-table-column>
                  <el-table-column
                      prop="date5"
                      label="Mx(Nmm)"
                      width="100"
                      >
                  </el-table-column>
                  <el-table-column
                      prop="date6"
                      label="My(Nmm)"
                      width="100"
                      >
                  </el-table-column>
                </el-table>
                <el-table
                    v-if="input_data.load_type=='2'"
                    class="data_container1"
                    :data="tableData2"
                    height="100%"
                    stripe
                    style="width: 100%;font-size: 12px">
                  <el-table-column
                      prop="date1"
                      label="序号"
                      width="75"
                      >
                  </el-table-column>
                  <el-table-column
                      prop="date2"
                      label="Fx(N)"
                      width="75"
                      >
                  </el-table-column>
                  <el-table-column
                      prop="date3"
                      label="Fy(N)"
                      width="75"
                      >
                  </el-table-column>
                  <el-table-column
                      prop="date4"
                      label="Fz(N)"
                      width="75"
                      >
                  </el-table-column>
                  <el-table-column
                      prop="date5"
                      label="Mx(Nmm)"
                      width="75"
                      >
                  </el-table-column>
                  <el-table-column
                      prop="date6"
                      label="My(Nmm)"
                      width="75"
                      >
                  </el-table-column>
                  <el-table-column
                      prop="date7"
                      label="时间占比"
                      width="75"
                      >
                  </el-table-column>
                  <el-table-column
                      prop="date8"
                      label="转速(rpm)"
                      width="90"
                      >
                  </el-table-column>
                </el-table>
              </a-row>
              <a-row style="height: 52%;width: 100%;">
                <a-col :span="12" style="height: 100%;">
                  <a-col :span="12" style="height: 100%;text-align: right">
                    <a-row style="height: 10%;width: 100%;">轴承类型</a-row>
                    <a-row style="height: 10%;width: 100%;">轴承内径(mm)</a-row>
                    <a-row style="height: 10%;width: 100%;">轴承外径(mm)</a-row>
                    <a-row style="height: 10%;width: 100%;">滚动体直径(mm)</a-row>
                    <a-row style="height: 10%;width: 100%;">滚动体个数</a-row>
                    <a-row style="height: 10%;width: 100%;">内圈沟曲率半径系数</a-row>
                    <a-row style="height: 10%;width: 100%;">外圈沟曲率半径系数</a-row>
                    <a-row style="height: 10%;width: 100%;">轴向游隙(um)</a-row>
                    <a-row style="height: 10%;width: 100%;">名义接触角(°)</a-row>
                    <a-row style="height: 10%;width: 100%;"></a-row>
                  </a-col>
                  <a-col :span="12" style="height: 100%;">
                    <a-row style="height: 10%;width: 100%;">
                      <select style="height: 100%;margin-left: 5px" v-model="input_data.bearing_type">
                        <option value="1">角接触角</option>
                        <option value="2">推力角接触球</option>
                      </select>
                    </a-row>
                    <a-row style="height: 10%;width: 100%;"><input type="text" style="height: 90%;width: 68%;margin-left: 5px" v-model="input_data.d"/></a-row>
                    <a-row style="height: 10%;width: 100%;"><input type="text" style="height: 90%;width: 68%;margin-left: 5px" v-model="input_data.D"/></a-row>
                    <a-row style="height: 10%;width: 100%;"><input type="text" style="height: 90%;width: 68%;margin-left: 5px" v-model="input_data.Dw"/></a-row>
                    <a-row style="height: 10%;width: 100%;"><input type="text" style="height: 90%;width: 68%;margin-left: 5px" v-model="input_data.Z"/></a-row>
                    <a-row style="height: 10%;width: 100%;"><input type="text" style="height: 90%;width: 68%;margin-left: 5px" v-model="input_data.fi"/></a-row>
                    <a-row style="height: 10%;width: 100%;"><input type="text" style="height: 90%;width: 68%;margin-left: 5px" v-model="input_data.fe"/></a-row>
                    <a-row style="height: 10%;width: 100%;"><input type="text" style="height: 90%;width: 68%;margin-left: 5px" v-model="input_data.contact_angle"/></a-row>
                    <a-row style="height: 10%;width: 100%;"><input type="text" style="height: 90%;width: 68%;margin-left: 5px" v-model="input_data.axial_clearance"/></a-row>
                  </a-col>
                </a-col>
                <a-col :span="12" style="height: 100%;">
                  <a-col :span="12" style="height: 100%;text-align: right">
                    <a-row style="height: 10%;width: 100%;">轴承转速(rpm)</a-row>
                    <a-row style="height: 10%;width: 100%;">轴承外圈弹性模量(MPa)</a-row>
                    <a-row style="height: 10%;width: 100%;">轴承外圈泊松比</a-row>
                    <a-row style="height: 10%;width: 100%;">滚动体弹性模量(MPa)</a-row>
                    <a-row style="height: 10%;width: 100%;">滚动体泊松比</a-row>
                    <a-row style="height: 10%;width: 100%;">轴承内圈弹性模量(MPa)</a-row>
                    <a-row style="height: 10%;width: 100%;">轴承内圈泊松比</a-row>
                    <a-row style="height: 10%;width: 100%;">轴承额定动载荷(N)</a-row>
                    <a-row style="height: 10%;width: 100%;">轴承额定静载荷(N)</a-row>

                    <a-row style="height: 10%;width: 100%;"></a-row>
                  </a-col>
                  <a-col :span="12" style="height: 100%;">
                    <a-row style="height: 10%;width: 100%;"><input type="text" style="height: 90%;width: 68%;margin-left: 5px" v-model="input_data.speed"/></a-row>
                    <a-row style="height: 10%;width: 100%;"><input type="text" style="height: 90%;width: 68%;margin-left: 5px" v-model="input_data.E_e"/></a-row>
                    <a-row style="height: 10%;width: 100%;"><input type="text" style="height: 90%;width: 68%;margin-left: 5px" v-model="input_data.v_e"/></a-row>
                    <a-row style="height: 10%;width: 100%;"><input type="text" style="height: 90%;width: 68%;margin-left: 5px" v-model="input_data.E_b"/></a-row>
                    <a-row style="height: 10%;width: 100%;"><input type="text" style="height: 90%;width: 68%;margin-left: 5px" v-model="input_data.v_b"/></a-row>
                    <a-row style="height: 10%;width: 100%;"><input type="text" style="height: 90%;width: 68%;margin-left: 5px" v-model="input_data.E_i"/></a-row>
                    <a-row style="height: 10%;width: 100%;"><input type="text" style="height: 90%;width: 68%;margin-left: 5px" v-model="input_data.v_i"/></a-row>
                    <a-row style="height: 10%;width: 100%;"><input type="text" style="height: 90%;width: 68%;margin-left: 5px" v-model="input_data.C"/></a-row>
                    <a-row style="height: 10%;width: 100%;"><input type="text" style="height: 90%;width: 68%;margin-left: 5px" v-model="input_data.C0"/></a-row>
                  </a-col>
                </a-col>
              </a-row>
            </a-row>
          </a-row>
          <a-row style="height: 40%;width: 100%;" class="data_container">
            <a-row style="height: 8%;width: 100%;border-radius: 3px;background: #D7D7D7">修正参数</a-row>
            <a-row style="height: 92%;width: 100%;">
              <a-col :span="12" style="height: 100%;position: relative">
                <a-col :span="12" style="height: 100%;text-align: right">
                  <a-row style="height: 15%;width: 100%;">轴承疲劳极限载荷(N)</a-row>
                  <a-row style="height: 15%;width: 100%;"></a-row>
                  <a-row style="height: 15%;width: 100%;">可靠度(%)</a-row>
                  <a-row style="height: 15%;width: 100%;">清洁度条件</a-row>
                  <a-row style="height: 15%;width: 100%;" v-if="input_data.contamination_condition=='1'">润滑方式</a-row>
                  <a-row style="height: 15%;width: 100%;" v-if="input_data.contamination_condition=='1'">清洁度等级</a-row>
                  <a-row style="height: 15%;width: 100%;" v-if="input_data.contamination_condition=='2'">污染系数</a-row>
                </a-col>
                <a-col :span="12" style="height: 100%;position: relative">
                  <form style="position: absolute;right: 0px;z-index: 1" >
                    <input type="radio" name="male" value="1" v-model="radio_2" v-on:click="dianji2">手动<br>
                    <input type="radio" name="male" value="2" style="margin-top: 10px" v-model="radio_2" v-on:click="dianji3">自动<br>
                  </form>
                  <a-row style="height: 15%;width: 100%;" ><input type="text" style="height: 70%;width: 68%;margin-left: 5px" ref="inp" v-model="input_data.Cu"/></a-row>
                  <a-row style="height: 15%;width: 100%;"></a-row>
                  <a-row style="height: 15%;width: 100%;">
                    <select style="height: 80%;margin-left: 5px;width: 68%;" @click="xz1" v-model="input_data.reliability" v-on:click="dianji4">
                      <option value="1">90</option>
                      <option value="2">95</option>
                      <option value="3">96</option>
                      <option value="4">97</option>
                      <option value="5">98</option>
                      <option value="6">99</option>
                      <option value="7">99.2</option>
                      <option value="8">99.4</option>
                      <option value="9">99.6</option>
                      <option value="10">99.8</option>
                      <option value="11">99.9</option>
                      <option value="12">99.92</option>
                      <option value="13">99.94</option>
                      <option value="14">99.95</option>
                    </select>
                  </a-row>
                  <a-row style="height: 15%;width: 100%;">
                    <select style="height: 80%;margin-left: 5px;width: 68%;" @click="xz1_display" v-model="input_data.contamination_condition" v-on:click="dianji5">
                      <option  value="1">润滑油纯净度按ISO4406已知</option>
                      <option value="2">只大体知道清洁度等级</option>
                    </select>
                  </a-row>
                  <a-row style="height: 15%;width: 100%;" v-if="input_data.contamination_condition=='2'"><input type="text" style="height: 70%;width: 68%;margin-left: 5px" ref="inp" v-model="input_data.e_C_s" /></a-row>
                  <a-row style="height: 15%;width: 100%;">
                    <select style="height: 80%;margin-left: 5px;width: 68%;" @click="xz1" v-model="input_data.lubricate_method" v-on:click="dianji6" v-if="input_data.contamination_condition=='1'">
                      <option value="1">油润滑，在线过滤</option>
                      <option value="2">油润滑，离线过滤或未过滤</option>
                      <option value="3">脂润滑</option>
                    </select>
                  </a-row>
                  <a-row style="height: 15%;width: 100%;">
                    <select style="height: 80%;margin-left: 5px;width: 68%" @click="xz1" v-model="input_data.contamination_level" v-on:click="dianji7" v-if="input_data.contamination_condition=='1'">
                      <option value="1">-/13/10,-/12/10,-/11/9,-/12/9</option>
                      <option value="2">-/15/12,-/14/12,-/16/12,-/16/13</option>
                      <option value="3">-/17/14,-/18/14,-/18/15,-/19/15</option>
                      <option value="4">-/19/16,-/18/16,-/20/17,21/17</option>
                      <option value="5">-/21/18,-/21/19,-122/19,-/23/19</option>
                    </select>
                  </a-row>
                </a-col>
              </a-col>
              <a-col :span="12" style="height: 100%;">
                <a-col :span="12" style="height: 100%;text-align: right;font-size: 15px">
                  <a-row style="height: 15%;width: 100%;">润滑油40℃粘度(mm'2/s)</a-row>
                  <a-row style="height: 15%;width: 100%;font-size: 14px">润滑油100℃粘度(mm12/s)</a-row>
                  <a-row style="height: 15%;width: 100%;">润滑油工作温度(℃)</a-row>
                  <a-row style="height: 15%;width: 100%;"> 是否添加极压润滑剂</a-row>
                  <a-row style="height: 15%;width: 100%;"></a-row>
                  <a-row style="height: 15%;width: 100%;"></a-row>
                </a-col>
                <a-col :span="12" style="height: 100%;">
                  <a-row style="height: 15%;width: 100%;"><input type="text" style="height: 70%;width: 68%;margin-left: 5px" v-model="input_data.v_40" /></a-row>
                  <a-row style="height: 15%;width: 100%;"><input type="text" style="height: 70%;width: 68%;margin-left: 5px" v-model="input_data.v_100"/></a-row>
                  <a-row style="height: 15%;width: 100%;"><input type="text" style="height: 70%;width: 68%;margin-left: 5px" v-model="input_data.oil_temperature"/></a-row>
                  <a-row style="height: 15%;width: 100%;">
                    <select style="height: 80%;margin-left: 5px;width: 68%;" v-model="input_data.pp4">
                      <option value="1">是</option>
                      <option value="0">否</option>
                    </select>
                  </a-row>
                </a-col>
              </a-col>
            </a-row>
          </a-row>
        </a-row>
      </a-col>
      <a-col :span="14" style="height: 100%" class="data_container">
        <a-row style="height: 3%;width: 100%;background: #D7D7D7;border-radius: 3px">输出参数</a-row>
        <a-row style="height: 97%;width: 100%;border-radius: 3px">
          <a-row style="height: 40%;width: 100%;" class="data_container">
            <a-row style="height: 8%;width: 100%;background: #D7D7D7;border-radius: 3px">结果汇总</a-row>
            <a-row style="height: 92%;width: 100%;">
              <a-row style="height: 50%;width: 100%;">
                <a-col :span="2" style="height:100%;position: relative"><span style="position: absolute;bottom:50px;height: 50px">寿命与静强度计算结果</span></a-col>
                <a-col :span="22" style="height:100%;">
                  <el-table
                      v-if="input_data.load_type=='1'"
                      class="data_container1"
                      :data="tableData3"
                      height="96%"
                      stripe
                      style="width: 100%;font-size: 12px">
                    <el-table-column
                        prop="date1"
                        label="序号"
                        width="50"
                        >
                    </el-table-column>
                    <el-table-column
                        prop="date2"
                        label="可靠度修正系数a1 "
                        width="110"
                        >
                    </el-table-column>
                    <el-table-column
                        prop="date3"
                        label="寿命修正系数alSO"
                        width="119"
                        >
                    </el-table-column>
                    <el-table-column
                        prop="date4"
                        label="L10寿命(hr)"
                        width="100"
                        >
                    </el-table-column>
                    <el-table-column
                        prop="date5"
                        label="Lnm寿命(hr)"
                        width="100"
                        >
                    </el-table-column>
                    <el-table-column
                        prop="date6"
                        label="L10r寿命(hr)"
                        width="100"
                        >
                    </el-table-column>
                    <el-table-column
                        prop="date7"
                        label="Lnmr寿命(hr)"
                        width="100"
                        >
                    </el-table-column>
                    <el-table-column
                        prop="date8"
                        label="当量静载荷(N)"
                        width="100"
                        >
                    </el-table-column>
                    <el-table-column
                        prop="date9"
                        label="静强度安全系数"
                        width="100"
                        >
                    </el-table-column>
                  </el-table>
                  <el-table
                      v-if="input_data.load_type=='2'"
                      class="data_container1"
                      :data="tableData4"
                      height="96%"
                      stripe
                      style="width: 60%;font-size: 12px">
                    <el-table-column
                        prop="date1"
                        label="L10寿命(hr)"
                        width="100"
                        >
                    </el-table-column>
                    <el-table-column
                        prop="date2"
                        label="Lnm寿命(hr)"
                        width="100"
                        >
                    </el-table-column>
                    <el-table-column
                        prop="date3"
                        label="L10r寿命(hr)"
                        width="100"
                        >
                    </el-table-column>
                    <el-table-column
                        prop="date4"
                        label="Lnmr寿命(hr)"
                        width="110"
                        >
                    </el-table-column>
                  </el-table>
                </a-col>
              </a-row>
              <a-row style="height: 50%;width: 100%;">
                <a-col :span="12" style="height: 100%;text-align: center">
                 <a-row style="font-size: 14px;height: 15%">内圈最大接触应力(MPa)</a-row>
                 <a-row style="font-size: 14px;height: 85%;text-align: center">
                   <a-col :span="6" style="height: 100%;"></a-col>
                   <a-col :span="18" style="height: 100%;">
                     <el-table
                         class="data_container1"
                         :data="tableData5"
                         height="100%"
                         stripe
                         style="width: 60%;font-size: 12px;">
                       <el-table-column
                           prop="date1"
                           label="序号"
                           width="100"
                           >
                       </el-table-column>
                       <el-table-column
                           prop="date2"
                           label="应力(MPa)"
                           width="110"
                           >
                       </el-table-column>
                     </el-table>
                   </a-col>

                 </a-row>
                </a-col>
                <a-col :span="12" style="height: 100%;text-align: center">
                  <a-row style="font-size: 14px;height: 15%">外圈最大接触应力(MPa)</a-row>
                  <a-row style="font-size: 14px;height: 85%">
                    <a-col :span="6" style="height: 100%;"></a-col>
                    <a-col :span="18" style="height: 100%;">
                      <el-table
                          class="data_container1"
                          :data="tableData6"
                          height="100%"
                          stripe
                          style="width: 60%;font-size: 12px;">
                        <el-table-column
                            prop="date1"
                            label="序号"
                            width="100"
                            >
                        </el-table-column>
                        <el-table-column
                            prop="date2"
                            label="应力(MPa)"
                            width="110"
                            >
                        </el-table-column>
                      </el-table>
                    </a-col>

                  </a-row>

                </a-col>
              </a-row>
            </a-row>
          </a-row>
          <a-row style="height: 60%;width: 100%;position: relative" class="data_container">
            <a-row style="height: 6%;width: 100%;background: #D7D7D7;border-radius: 3px">中间结果</a-row>
            <a-row style="height: 94%;width: 100%;border-radius: 3px">
              <a-row style="height: 33%;width: 100%;">
                <a-col :span="4" style="height: 100%;position: relative"><span style="position: absolute;bottom: 50px;left: 20px">最大接触应力(MPa)</span></a-col>
                <a-col :span="20" style="height: 100%">
                  <el-table
                      class="data_container1"
                      :data="tableData7"
                      height="100%"
                      stripe
                      style="width: 60%;font-size: 12px;">
                    <el-table-column
                        prop="date1"
                        label="序号"
                        width="100"
                        >
                    </el-table-column>
                    <el-table-column
                        prop="date2"
                        label="滚动体序号"
                        width="110"
                        >
                    </el-table-column>
                    <el-table-column
                        prop="date3"
                        label="内圈"
                        width="110"
                        >
                    </el-table-column>
                    <el-table-column
                        prop="date4"
                        label="外圈"
                        width="110"
                       >
                    </el-table-column>
                  </el-table>
                </a-col>
              </a-row>
              <a-row style="height: 33%;width: 100%;">
                <a-col :span="4" style="height: 100%;position: relative"><span style="position: absolute;bottom: 50px;left: 20px">接触半宽(mm)</span></a-col>
                <a-col :span="20" style="height: 100%">
                  <el-table
                      class="data_container1"
                      :data="tableData8"
                      height="100%"
                      stripe
                      style="width: 60%;font-size: 12px;">
                    <el-table-column
                        prop="date1"
                        label="序号"
                        width="100"
                        >
                    </el-table-column>
                    <el-table-column
                        prop="date2"
                        label="滚动体序号"
                        width="110"
                        >
                    </el-table-column>
                    <el-table-column
                        prop="date3"
                        label="内圈"
                        width="110"
                       >
                    </el-table-column>
                    <el-table-column
                        prop="date4"
                        label="外圈"
                        width="110"
                        >
                    </el-table-column>
                  </el-table>
                </a-col>
              </a-row>
              <a-row style="height: 33%;width: 100%;">
                <a-col :span="4" style="height: 100%;position: relative"><span style="position: absolute;bottom: 50px;left: 20px">滚动体法向载荷(N)</span></a-col>
                <a-col :span="20" style="height: 100%">
                  <el-table
                      class="data_container1"
                      :data="tableData9"
                      height="100%"
                      stripe
                      style="width: 60%;font-size: 12px;;color: black">
                    <el-table-column
                        prop="date1"
                        label="序号"
                        width="100"
                       >
                    </el-table-column>
                    <el-table-column
                        prop="date2"
                        label="滚动体序号"
                        width="110"
                        >
                    </el-table-column>
                    <el-table-column
                        prop="date3"
                        label="法向载荷(N)"
                        width="110"
                        >
                    </el-table-column>
                    <el-table-column
                        prop="date4"
                        label=""
                        width="110"
                    >
                    </el-table-column>
                  </el-table>
                </a-col>
              </a-row>
            </a-row>
            <button style="width: 10%;margin-left: 20px;position: absolute;bottom: 35px;right: 100px;height: 10%;padding: 0px" @click="figure">计算</button>
          </a-row>

        </a-row>

      </a-col>
    </a-row>
  </div>
</template>

<script>
import {filetext, firedelete, namemodule_bevel_gear_strength_static} from "@/api/file";

export default {
  name: "namemodule_bevel_gear_strength_static",
  created() {
    document.title = '推力角接触球轴承滚动体受载与寿命计算'
    this.$store.state.file.key = 31
  },
  mounted(){
    //绑定页面退出事件
    window.onbeforeunload= (e)=>{
      e = e || window.event;
      if (e) {
        e.returnValue = '关闭提示';
      }
      this.delete()//调用自己的方法
      // Chrome, Safari, Firefox 4+, Opera 12+ , IE 9+
      return '关闭提示';
    };
  },
  data(){
    return{
      form2:{
        uuids:[]
      },
      table1:true,
      table2:false,
      xuanze1:'2',
      radio_2:'1',
      tableData1:[],
      tableData2:[],
      tableData3:[],
      tableData4:[],
      tableData5:[],
      tableData6:[],
      tableData7:[],
      tableData8:[],
      tableData9:[],
      input_data:this.$store.state.file.dataList[31],
    }
  },
  methods:{
    //删除载荷谱
    async delete(){
      this.form2.uuids=this.form2.uuids.toString();//将载荷谱文件数组转成字符串
      await firedelete(this.form2).then(res => {
        console.log(res);
      })
    },
    customRequest(data){//导入载荷谱函数
      const formData=new FormData()
      formData.append('fileName',data.file)
      filetext(formData).then(res=>{
        this.tableData1.splice(0)
        this.tableData2.splice(0)
        if(this.input_data.load_type=="1"){
          for (let i=0;i<res.data.filedata.length;i++){
            this.tableData1.push({
              date1:res.data.filedata[i][0],
              date2:res.data.filedata[i][1],
              date3:res.data.filedata[i][2],
              date4:res.data.filedata[i][3],
              date5:res.data.filedata[i][4],
              date6:res.data.filedata[i][5],
            })
          }
        }else{
          for (let i=0;i<res.filedata.length;i++){
            this.tableData2.push({
              date1:res.data.filedata[i][0],
              date2:res.data.filedata[i][1],
              date3:res.data.filedata[i][2],
              date4:res.data.filedata[i][3],
              date5:res.data.filedata[i][4],
              date6:res.data.filedata[i][5],
              date7:res.data.filedata[i][6],
              date8:res.data.filedata[i][7],
            })
          }
        }
        this.input_data.uuid=res.data.uuid
        this.form2.uuids.push(res.data.uuid);
      }).catch(error=>{
        console.log(error)
      })
    },
    figure(){
      console.log(this.input_data.uuid)
      namemodule_bevel_gear_strength_static(this.input_data).then(res=>{
        this.tableData3.splice(0)
        this.tableData4.splice(0)
        this.tableData5.splice(0)
        this.tableData6.splice(0)
        this.tableData7.splice(0)
        this.tableData8.splice(0)
        this.tableData9.splice(0)
        for (let i=0;i<res.life_fatigue_total.length;i++){
          this.tableData4.push({
            date1:res.life_fatigue_total[i][0],
            date2:res.life_fatigue_total[i][1],
            date3:res.life_fatigue_total[i][2],
            date4:res.life_fatigue_total[i][3],
          })
        }
        for (let i=0;i<res.result_life_spectrum.length;i++){
          this.tableData3.push({
            date1:res.result_life_spectrum[i][0],
            date2:res.result_life_spectrum[i][1],
            date3:res.result_life_spectrum[i][2],
            date4:res.result_life_spectrum[i][3],
            date5:res.result_life_spectrum[i][4],
            date6:res.result_life_spectrum[i][5],
            date7:res.result_life_spectrum[i][6],
            date8:res.result_life_spectrum[i][7],
            date9:res.result_life_spectrum[i][8],
          })
        }
        for (let i=0;i<res.n_max_spectrum.length;i++){
          this.tableData5.push({
            date1:res.n_max_spectrum[i][0],
            date2:res.n_max_spectrum[i][1],
          })
        }
        for (let i=0;i<res.w_max_spectrum.length;i++){
          this.tableData6.push({
            date1:res.w_max_spectrum[i][0],
            date2:res.w_max_spectrum[i][1],
          })
        }
        for (let i=0;i<res.semi_minor_all_spectrum.length;i++){
          this.tableData8.push({
            date1:res.semi_minor_all_spectrum[i][0],
            date2:res.semi_minor_all_spectrum[i][1],
            date3:res.semi_minor_all_spectrum[i][2],
            date4:res.semi_minor_all_spectrum[i][3],
          })
        }
        for (let i=0;i<res.stress_all_spectrum.length;i++){
          this.tableData7.push({
            date1:res.stress_all_spectrum[i][0],
            date2:res.stress_all_spectrum[i][1],
            date3:res.stress_all_spectrum[i][2],
            date4:res.stress_all_spectrum[i][3],
          })
        }
        for (let i=0;i<res.qj_all_spectrum.length;i++){
          this.tableData9.push({
            date1:res.qj_all_spectrum[i][0],
            date2:res.qj_all_spectrum[i][1],
            date3:res.qj_all_spectrum[i][2],
            date4:res.qj_all_spectrum[i][3],
          })
        }
      }).catch(err=>{
        console.log(err)
      })
    },

    import_load(){

    },
    xz1(){

    },
    dianji1(){

    },
    dianji2(){
      this.$refs.inp.disabled=false
      this.$refs.inp.style.background='white'
    },
    dianji3(){
      this.$refs.inp.disabled=true
      this.$refs.inp.style.background='#DfDfDF'
    },
    dianji4(){

    },
    xz1_display(){

    },
    dianji5(){

    },
    dianji6(){

    },
    dianji7(){

    },
    dianji8(){

    },
  }
}
</script>

<style scoped>
.data_container{
  border: 0.5px solid rgba(231, 231, 231, 0.486);
  border-radius: 5px;
  box-shadow:2px 2px 3px #aaaaaa;
}
.data_container1{
  border: 2px solid rgba(231, 231, 231, 0.486);
  border-radius: 5px;
  box-shadow:0px 0px 0px #aaaaaa;
}
input{
  text-align: center;
}
</style>